JavaScript
A5.u.math.conversionallowed Method
Syntax
A5.u.math.conversion.allowed(unitFrom,unitTo)
Arguments
- unitFromstring
The unit to convert from.
- unitTostring
The unit to convert to.
Returns
- allowedboolean
Can the units be converted.
Description
Whether or not two units be converted.
Discussion
This method will return a boolean with a value of true if the two units can be converted.
Example
var allowed = A5.u.math.conversion.allowed('km/h','m/h'); // allowed = true allowed = A5.u.math.conversion.allowed('km/h','lb'); // allowed = false